﻿using System.Collections.Generic;
using Microsoft.CodeAnalysis.CSharp.Syntax;

namespace Beeflys.Generator
{
    static class CompilationUnitSyntaxEx
    {
        public static List<string> GetImports(this CompilationUnitSyntax syntax)
        {
            var imports = new List<string>();
            foreach (UsingDirectiveSyntax usingItem in syntax.Usings)
            {
                imports.Add(usingItem.Name.ToFullString());
            }

            return imports;
        }
    }
}